package nbcp.web.open

import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.RestController

import nbcp.base.comm.JsonResult
import nbcp.comm.JsonpMapping
import nbcp.base.comm.OpenAction
import nbcp.web.ClientIp

import javax.servlet.http.HttpServletRequest

/**
 * Created by udi on 17-5-23.
 */
@OpenAction
@Api(description = "C端用户验证二维码")
@RestController
@JsonpMapping("/mp")
class Test_Controller {


    //C端验证首页
    @ApiOperation("获取request 中的信息")
    @JsonpMapping("/requestInfo")
    fun requestInfo(request: HttpServletRequest): JsonResult {

        val ip = request.ClientIp;//.getClientIp(request)
        println(ip)

        return JsonResult();
    }


}